import App from './App'
import * as api from '@/common/api'
import * as util from '@/common/util'
import store from '@/store'
import * as ResponseStatus from '@/common/response-status.js'
// #ifndef VUE3
import Vue from 'vue'
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue"
import MescrollUni from "@/components/mescroll-uni/mescroll-uni.vue"
import zyworkIcon from "@/components/zywork-icon/zywork-icon.vue"
import mdxAuthentication from "@/components/mdx-authentication/mdx-authentication.vue"
import mdxFromInput from '@/components/mdx-from-input/mdx-from-input.vue'
import vTabs from '@/components/v-tabs/v-tabs.vue'
// 引入全局uView
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
Vue.component('mescroll-body', MescrollBody)
Vue.component('mescroll-uni', MescrollUni)
Vue.component('zywork-icon', zyworkIcon)
Vue.component('mdx-authentication', mdxAuthentication)
Vue.component('v-tabs', vTabs)
Vue.component('mdx-from-input', mdxFromInput)
Vue.config.productionTip = false
App.mpType = 'app'
const prePage = ()=>{
	let pages = getCurrentPages();
	let prePage = pages[pages.length - 2];
	// #ifdef H5
	return prePage;
	// #endif
	return prePage.$vm;
}
Vue.prototype.$prePage = {prePage};
Vue.prototype.$api = api;
Vue.prototype.$util = util;
Vue.prototype.$store = store;
Vue.prototype.$ResponseStatus = ResponseStatus;
const app = new Vue({
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif